<!--招聘在线列表-->
<template>
  <el-table
      ref="multipleTable"
      :data="arryList"
      :stripe="true"
      :border="true"
      tooltip-effect="dark"
      style="width: 100%"
      header-cell-class-name="table-text-c"
      cell-class-name="table-text-c">
    <el-table-column
        prop="id"
        label="ID"
        width="50">
    </el-table-column>
    <el-table-column
        label="拟聘岗位">
      <template slot-scope="scope">
        {{ scope.row.job.name }}
      </template>
    </el-table-column>
    <el-table-column
        prop="update_time"
        label="发布日期">
    </el-table-column>
    <el-table-column
        prop="end_time"
        label="截止日期">
    </el-table-column>
    <el-table-column
        label="拟聘人数"
        prop="number">
    </el-table-column>
    <el-table-column
        label="简历/份">
      <template slot-scope="scope">
        <span class="fileNum" @click="showList(1,scope.row.id)">{{ scope.row.sum_number }}</span>
      </template>
    </el-table-column>
    <el-table-column
        label="待处理">
      <template slot-scope="scope">
        <span class="fileNum" @click="showList(2,scope.row.id)">{{ scope.row.examine_number }}</span>
      </template>
    </el-table-column>
    <el-table-column
        label="待面试">
      <template slot-scope="scope">
        <span class="fileNum" @click="showList(3,scope.row.id)">{{ scope.row.recruit_number }}</span>
      </template>
    </el-table-column>
    <el-table-column
        label="考核中/人">
      <template slot-scope="scope">
        <span class="fileNum" @click="showList(4,scope.row.id)">{{ scope.row.trail_number }}</span>
      </template>
    </el-table-column>
    <el-table-column
        label="已录用/人">
      <template slot-scope="scope">
        <span class="fileNum" @click="showList(5,scope.row.id)">{{ scope.row.in_number }}</span>
      </template>
    </el-table-column>
    <el-table-column
        label="操作"
        width="280">
      <template slot-scope="scope">
        <el-button size="mini" @click="addRecruit(scope.row.id)">查看招聘详情</el-button>
        <el-button size="mini" @click="getQrcode(scope.row)">二维码</el-button>
        <el-button type="danger" size="mini" @click="resumeEndFn(scope.row.id)">截止</el-button>
      </template>
    </el-table-column>
  </el-table>
</template>

<script>
export default {
  props: ['arryList'],
  name: "index",
  created() {
    console.log('arryList:', this.arryList)
  },
  methods: {
    addRecruit(id) {
      this.$emit('addRecruit', {id: id})
    },
    showList(option,id) {
      this.$emit('showList', {type: option, id: id})
    },
    resumeEndFn(id){
      this.$emit('resumeEndFn',id)
    },
    getQrcode(option){
      this.$emit('getQrcode', option)
    }
  }
}
</script>

<style scoped>
.fileNum {
  color: #007dff;
  font-weight: bold;
}

.fileNum:hover {
  text-decoration: underline;
}
</style>
